<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">

            <div class="form-group col-sm-2">

                    <select   id="connid" v-model="q.connid" class="form-control">
                        <option value="0" selected>请选择数据源</option>
                        <option v-for="item in dataSelect" :value="item.id">{{item.connname}}</option>
                    </select>
            </div>
            <a class="btn btn-default" @click="query">查询</a>
            <a class="btn btn-default" @click="upCount">生成单表数据量</a>
            <a class="btn btn-default" @click="upMoreCount">批量生成数据量</a>
            <a class="btn btn-default" @click="queryCloumns">生成列信息</a>
            <a class="btn btn-default" @click="queryMoreCloumns">批量生成列信息</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>

    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">数据源ID</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tableInfo.dbId" placeholder="数据源ID"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tableInfo.tableName" placeholder=""/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tableInfo.remarks" placeholder=""/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..."
                       @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/tableinfo.js?_${.now?long}"></script>
</body>
</html>